{% extends 'base.html' %}

{% load staticfiles %}

{% block main %}
    <style>
        table{
    table-layout:fixed;
    empty-cells:show;
    border-collapse: collapse;
    margin:0 auto;
}
td{
    height:20px;
}
h1,h2,h3{
    font-size:12px;
    margin:0;
    padding:0;
}
.title { background: #FFF; border: 1px solid #9DB3C5; padding: 1px; width:90%;margin:20px auto; }
    .title h1 { line-height: 31px; text-align:center; background-repeat: repeat-x; background-position: 0 0; color: #FFF; }
        .title th, .title td { border: 1px solid #CAD9EA; padding: 5px; }
/*这个是借鉴一个论坛的样式*/
table.t1{
    border:1px solid #cad9ea;
    color:#666;
}
table.t1 th {
    background-repeat:repeat-x;
    height:30px;
}
table.t1 td,table.t1 th{
    border:1px solid #cad9ea;
    padding:0 1em 0;
}
table.t1 tr.a1{
    background-color:#f5fafe;
}

table.t2{
    border:1px solid #9db3c5;
    color:#666;
}
table.t2 th {
    background-repeat:repeat-x;
    height:30px;
    color:#fff;
}
table.t2 td{
    border:1px dotted #cad9ea;
    padding:0 2px 0;
}
table.t2 th{
    border:1px solid #a7d1fd;
    padding:0 2px 0;
}
table.t2 tr.a1{
    background-color:#e8f3fd;
}
table.t3{
    border:1px solid #fc58a6;
    color:#720337;
}
table.t3 th {
    background-repeat:repeat-x;
    height:30px;
    color:#35031b;
}
table.t3 td{
    border:1px dashed #feb8d9;
    padding:0 1.5em 0;
}
table.t3 th{
    border:1px solid #b9f9dc;
    padding:0 2px 0;
}
table.t3 tr.a1{
    background-color:#fbd8e8;
}
span{
    width: 100%;
    margin-left: 95%;
}
    </style>
    <span><a href="/staff/add/"><button>添加</button></a></span>
    <table width="90%" id="mytab"  border="1" class="t1" align="center">
      <thead align="center">
        <th width="10%">姓名</th>
        <th width="10%">性别</th>
        <th width="10%">工号</th>
        <th width="10%">部门</th>
        <th width="10%">籍贯</th>
        <th width="10%">电话</th>
        <th width="10%">入职时间</th>
        <th width="20%">操作</th>
      </thead>
        {% for staff in staffs %}
            <tr class='a1' align="center">
                <td>{{ staff.s_name }}</td>
                <td>{{ staff.s_sex }}</td>
                <td>{{ staff.s_id }}</td>
                <td>{{ staff.department_name }}</td>
                <td>{{ staff.native }}</td>
                <td>{{ staff.phone }}</td>
                <td>{{ staff.datetime|date:'y年m月d日'}}</td>
                <td><a href=""><button>修改</button></a>&emsp;&emsp;&emsp;<a href=""><button>删除</button></a></td>
            </tr>
        {% endfor %}

    </table>
{% endblock main %}

